import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()

// 查询党费金额列表
export function queryByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/dues-party-mgmt/queryByCondition',
    method: 'get',
    params: data
  })
}

// 添加党费
export function add (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/dues-party-mgmt/add',
    method: 'post',
    data
  })
}

// 编辑党费
export function edit (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/dues-party-mgmt/edit',
    method: 'post',
    data
  })
}

// 删除党费
export function deleteById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/dues-party-mgmt/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 查询党员缴费
export function queryDuesByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/dues-party-member-info/queryByCondition`,
    method: 'get',
    params: data
  })
}

// 添加党员缴费
export function addDues (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/dues-party-member-info/add`,
    method: 'post',
    data
  })
}

// 编辑党员缴费
export function editDues (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/dues-party-member-info/edit`,
    method: 'post',
    data
  })
}

// 删除党员缴费
export function deleteDuesById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/dues-party-member-info/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 查询党员列表
export function queryPersonList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/queryList`,
    method: 'get',
    params: data
  })
}
